﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Authentificated.master" AutoEventWireup="true" CodeFile="GeneralShedule.aspx.cs" Inherits="UserManagement_GeneralShedule" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MCPH_Auth" Runat="Server">

<asp:ObjectDataSource ID="odsMonday" runat="server"
        TypeName="PM.BusinessLayer.SheduleController"
        DataObjectTypeName="PM.Entities.Shedule"
        SelectMethod="SelectForDay">
        
    <SelectParameters>
        <asp:QueryStringParameter QueryStringField="course" Name="course" Type="Int32" />
        <asp:QueryStringParameter QueryStringField="specID" Name="specialityID" Type="Int32" />
        <asp:Parameter DefaultValue="Понеділок" Name="day" Type="String" />
        <asp:QueryStringParameter QueryStringField="groupID" Name="groupID" Type="Int32" />
    </SelectParameters>
</asp:ObjectDataSource>

<asp:ObjectDataSource ID="odsTuesday" runat="server"
        TypeName="PM.BusinessLayer.SheduleController"
        DataObjectTypeName="PM.Entities.Shedule"
        SelectMethod="SelectForDay">
        
    <SelectParameters>
        <asp:QueryStringParameter QueryStringField="course" Name="course" Type="Int32" />
        <asp:QueryStringParameter QueryStringField="specID" Name="specialityID" Type="Int32" />
        <asp:Parameter DefaultValue="Вівторок" Name="day" Type="String" />
        <asp:QueryStringParameter QueryStringField="groupID" Name="groupID" Type="Int32" />
    </SelectParameters>
</asp:ObjectDataSource>

<asp:ObjectDataSource ID="odsWednesday" runat="server"
        TypeName="PM.BusinessLayer.SheduleController"
        DataObjectTypeName="PM.Entities.Shedule"
        SelectMethod="SelectForDay">
        
    <SelectParameters>
        <asp:QueryStringParameter QueryStringField="course" Name="course" Type="Int32" />
        <asp:QueryStringParameter QueryStringField="specID" Name="specialityID" Type="Int32" />
        <asp:Parameter DefaultValue="Середа" Name="day" Type="String" />
        <asp:QueryStringParameter QueryStringField="groupID" Name="groupID" Type="Int32" />
    </SelectParameters>
</asp:ObjectDataSource>

<asp:ObjectDataSource ID="odsThursday" runat="server"
        TypeName="PM.BusinessLayer.SheduleController"
        DataObjectTypeName="PM.Entities.Shedule"
        SelectMethod="SelectForDay">
        
    <SelectParameters>
        <asp:QueryStringParameter QueryStringField="course" Name="course" Type="Int32" />
        <asp:QueryStringParameter QueryStringField="specID" Name="specialityID" Type="Int32" />
        <asp:Parameter DefaultValue="Четвер" Name="day" Type="String" />
        <asp:QueryStringParameter QueryStringField="groupID" Name="groupID" Type="Int32" />
    </SelectParameters>
</asp:ObjectDataSource>

<asp:ObjectDataSource ID="odsFriday" runat="server"
        TypeName="PM.BusinessLayer.SheduleController"
        DataObjectTypeName="PM.Entities.Shedule"
        SelectMethod="SelectForDay">
        
    <SelectParameters>
        <asp:QueryStringParameter QueryStringField="course" Name="course" Type="Int32" />
        <asp:QueryStringParameter QueryStringField="specID" Name="specialityID" Type="Int32" />
        <asp:Parameter DefaultValue="П'ятниця" Name="day" Type="String" />
        <asp:QueryStringParameter QueryStringField="groupID" Name="groupID" Type="Int32" />
    </SelectParameters>
</asp:ObjectDataSource>

<asp:ObjectDataSource ID="odsSaturday" runat="server"
        TypeName="PM.BusinessLayer.SheduleController"
        DataObjectTypeName="PM.Entities.Shedule"
        SelectMethod="SelectForDay">
        
    <SelectParameters>
        <asp:QueryStringParameter QueryStringField="course" Name="course" Type="Int32" />
        <asp:QueryStringParameter QueryStringField="specID" Name="specialityID" Type="Int32" />
        <asp:Parameter DefaultValue="Субота" Name="day" Type="String" />
        <asp:QueryStringParameter QueryStringField="groupID" Name="groupID" Type="Int32" />
    </SelectParameters>
</asp:ObjectDataSource>

<table style="margin-top:10px;" width="100%">
    <tr>
        <td colspan="2" style="text-align: center">
            <span style="font-stretch:wider; font-size:large; font-family:Comic Sans MS;">РОЗКЛАД ЗАНЯТЬ<br />
                <asp:Label ID="lblSpec" runat="server" />&nbsp;
                <asp:Label ID="lblData" runat="server" /></span><br /><br />
            </td>
    </tr>
    <tr>
        <td>
            <span style="font-stretch:wider; font-weight:bold; font-size:medium;">Понеділок</span></td>
        <td>
            <span style="font-stretch:wider; font-weight:bold; font-size:medium;">Вівторок</span></td></tr>
    <tr>
        <td valign="top">
            <asp:GridView ID="grvGeneralMondayShedule" runat="server" Width="400px"
                DataKeyNames="SheduleID" DataSourceID="odsMonday" AutoGenerateColumns="false" CssClass="SheduleGridView" HeaderStyle-CssClass="SheduleGridView">
                <EmptyDataTemplate>
                    Вихідний день
                </EmptyDataTemplate>
                <Columns>
                    <asp:TemplateField HeaderText="Пара">
                        <ItemTemplate>
                            <%# Eval("LessonNumber.LessonNumber1") %></ItemTemplate></asp:TemplateField>
                            
                    <asp:TemplateField HeaderText="Предмет">
                        <ItemTemplate>
                            <%# Eval("Subject.Name") %></ItemTemplate></asp:TemplateField>
                            
                    <asp:TemplateField HeaderText="Викладач">
                        <ItemTemplate>
                            <%# Eval("User.ShortName") %></ItemTemplate></asp:TemplateField>
                            
                    <asp:TemplateField HeaderText="Аудиторія">
                        <ItemTemplate>
                            <%# Eval("NumberAudience") %></ItemTemplate></asp:TemplateField>
                </Columns>
            </asp:GridView>
        </td>
        <td valign="top">
            <asp:GridView ID="grvGeneralTuesdayShedule" runat="server" Width="400px"
                DataKeyNames="SheduleID" DataSourceID="odsTuesday" AutoGenerateColumns="false" CssClass="SheduleGridView" HeaderStyle-CssClass="SheduleGridView">
                <EmptyDataTemplate>
                    Вихідний день
                </EmptyDataTemplate>
                <Columns>
                    <asp:TemplateField HeaderText="Пара">
                        <ItemTemplate>
                            <%# Eval("LessonNumber.LessonNumber1") %></ItemTemplate></asp:TemplateField>
                            
                    <asp:TemplateField HeaderText="Предмет">
                        <ItemTemplate>
                            <%# Eval("Subject.Name") %></ItemTemplate></asp:TemplateField>
                            
                    <asp:TemplateField HeaderText="Викладач">
                        <ItemTemplate>
                            <%# Eval("User.ShortName") %></ItemTemplate></asp:TemplateField>
                            
                    <asp:TemplateField HeaderText="Аудиторія">
                        <ItemTemplate>
                            <%# Eval("NumberAudience") %></ItemTemplate></asp:TemplateField>
                </Columns>
            </asp:GridView>
        </td>
    </tr>
    
    <tr style="margin-top:10px; height:55px; vertical-align:bottom;">
        <td>
            <span style="font-stretch:wider; font-weight:bold; font-size:medium;">Середа</span></td>
        <td>
            <span style="font-stretch:wider; font-weight:bold; font-size:medium;">Четвер</span></td></tr>
    <tr>
        <td valign="top">
            <asp:GridView ID="GridView1" runat="server" Width="400px"
                DataKeyNames="SheduleID" DataSourceID="odsWednesday" AutoGenerateColumns="false" CssClass="SheduleGridView" HeaderStyle-CssClass="SheduleGridView">
                <EmptyDataTemplate>
                    Вихідний день
                </EmptyDataTemplate>
                <Columns>
                    <asp:TemplateField HeaderText="Пара">
                        <ItemTemplate>
                            <%# Eval("LessonNumber.LessonNumber1") %></ItemTemplate></asp:TemplateField>
                            
                    <asp:TemplateField HeaderText="Предмет">
                        <ItemTemplate>
                            <%# Eval("Subject.Name") %></ItemTemplate></asp:TemplateField>
                            
                    <asp:TemplateField HeaderText="Викладач">
                        <ItemTemplate>
                            <%# Eval("User.ShortName") %></ItemTemplate></asp:TemplateField>
                            
                    <asp:TemplateField HeaderText="Аудиторія">
                        <ItemTemplate>
                            <%# Eval("NumberAudience") %></ItemTemplate></asp:TemplateField>
                </Columns>
            </asp:GridView>
        </td>
        <td valign="top">
            <asp:GridView ID="GridView2" runat="server" Width="400px"
                DataKeyNames="SheduleID" DataSourceID="odsThursday" AutoGenerateColumns="false" CssClass="SheduleGridView" HeaderStyle-CssClass="SheduleGridView">
                <EmptyDataTemplate>
                    Вихідний день
                </EmptyDataTemplate>
                <Columns>
                    <asp:TemplateField HeaderText="Пара">
                        <ItemTemplate>
                            <%# Eval("LessonNumber.LessonNumber1") %></ItemTemplate></asp:TemplateField>
                            
                    <asp:TemplateField HeaderText="Предмет">
                        <ItemTemplate>
                            <%# Eval("Subject.Name") %></ItemTemplate></asp:TemplateField>
                            
                    <asp:TemplateField HeaderText="Викладач">
                        <ItemTemplate>
                            <%# Eval("User.ShortName") %></ItemTemplate></asp:TemplateField>
                            
                    <asp:TemplateField HeaderText="Аудиторія">
                        <ItemTemplate>
                            <%# Eval("NumberAudience") %></ItemTemplate></asp:TemplateField>
                </Columns>
            </asp:GridView>
        </td>
    </tr>
    
    <tr style="margin-top:10px; height:55px; vertical-align:bottom;">
        <td>
            <span style="font-stretch:wider; font-weight:bold; font-size:medium;">П'ятниця</span></td>
        <td>
            <span style="font-stretch:wider; font-weight:bold; font-size:medium;">Субота</span></td></tr>
    <tr>
        <td valign="top">
            <asp:GridView ID="GridView3" runat="server" Width="400px"
                DataKeyNames="SheduleID" DataSourceID="odsFriday" AutoGenerateColumns="false" CssClass="SheduleGridView" HeaderStyle-CssClass="SheduleGridView">
                <EmptyDataTemplate>
                    Вихідний день
                </EmptyDataTemplate>
                <Columns>
                    <asp:TemplateField HeaderText="Пара">
                        <ItemTemplate>
                            <%# Eval("LessonNumber.LessonNumber1") %></ItemTemplate></asp:TemplateField>
                            
                    <asp:TemplateField HeaderText="Предмет">
                        <ItemTemplate>
                            <%# Eval("Subject.Name") %></ItemTemplate></asp:TemplateField>
                            
                    <asp:TemplateField HeaderText="Викладач">
                        <ItemTemplate>
                            <%# Eval("User.ShortName") %></ItemTemplate></asp:TemplateField>
                            
                    <asp:TemplateField HeaderText="Аудиторія">
                        <ItemTemplate>
                            <%# Eval("NumberAudience") %></ItemTemplate></asp:TemplateField>
                </Columns>
            </asp:GridView>
        </td>
        <td valign="top">
            <asp:GridView ID="GridView4" runat="server" Width="400px"
                DataKeyNames="SheduleID" DataSourceID="odsSaturday" AutoGenerateColumns="false" CssClass="SheduleGridView" HeaderStyle-CssClass="SheduleGridView">
                <EmptyDataTemplate>
                    Вихідний день
                </EmptyDataTemplate>
                <Columns>
                    <asp:TemplateField HeaderText="Пара">
                        <ItemTemplate>
                            <%# Eval("LessonNumber.LessonNumber1") %></ItemTemplate></asp:TemplateField>
                            
                    <asp:TemplateField HeaderText="Предмет">
                        <ItemTemplate>
                            <%# Eval("Subject.Name") %></ItemTemplate></asp:TemplateField>
                            
                    <asp:TemplateField HeaderText="Викладач">
                        <ItemTemplate>
                            <%# Eval("User.ShortName") %></ItemTemplate></asp:TemplateField>
                            
                    <asp:TemplateField HeaderText="Аудиторія">
                        <ItemTemplate>
                            <%# Eval("NumberAudience") %></ItemTemplate></asp:TemplateField>
                </Columns>
            </asp:GridView>
        </td>
    </tr>
    <tr>
        <td colspan="2" align="left">
            <asp:Button ID="btnGoToBack" runat="server" Style="margin-top:25px"
                PostBackUrl="~/UserManagement/SwitchSheduleData.aspx" Text="Назад до вибору параметрів" /> </td>
    </tr>
</table>
</asp:Content>

